<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <?php
        if (isset($_POST['register']))
        {
            include 'ClassLibs/statics.php';
            if (bMatchPasswords($_POST['passfield'], $_POST['confirmfield']))
            {
                $bReg = bRegister($_POST['userfield'], $_POST['passfield']);
            }
            else
            {
                echo"Please check that passwords match";
            }
        }
        ?>
        <link rel="stylesheet" type="text/css" href="index_style.css"/>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <form method="POST" action="index.php">
            <input type="submit" name="backhome" value="Back to Homepage"/>
        </form>
        <form method="POST">
            <table>
                <tr>
                    <td>Username:</td>
                    <td><input type="text" name="userfield" maxlength="50"/></td>
                </tr>
                <tr>
                    <td>Password:</td>
                    <td><input type="password" name="passfield" maxlength="50"/></td>
                </tr>
                <tr>
                    <td>Confirm password:</td>
                    <td><input type="password" name="confirmfield" maxlength="50"/></td>
                </tr>
                <tr>
                    <td><input type="submit" name="register" value="Register"/></td>
                    <td><input type="submit" name="clear" value="Clear fields"/></td>
                </tr>
            </table>
        </form>
    </body>
</html>
